package com.xrit.test;

import com.xrit.dao.UserDao;
import com.xrit.pojo.User;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test1 {
    @Test
    public void test()
    {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("Spring-Mybatis.xml");
        UserDao userMapper = (UserDao) context.getBean("userDao");

        Integer id = userMapper.findByUserCount(new User("admin","123"));
        System.out.println(id);


//        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("Spring.xml");
//        UserService userServiceImpl = (UserService) context.getBean("userServiceImpl");
//
//        Integer admin = userServiceImpl.findByUserCount(new User("123","45600"));
//        System.out.println(admin);

    }
}
